#pragma once
#include "Matrix.h"
#include "Quaternion.h"

namespace Graphics{
	class SceneNode : public Core::MemTrack{
	public:
		SceneNode():m_scale(1.0f){}
		virtual ~SceneNode(){}

		void move(Utility::Math::Vector<> &dir){
			m_position += dir;
		}
	
		void moveX(float x){
			m_position(Utility::Math::_x_,m_position(Utility::Math::_x_)+x);
		}

		void moveY(float y){
			m_position(Utility::Math::_y_,m_position(Utility::Math::_y_)+y);
		}
	
		void moveZ(float z){
			m_position(Utility::Math::_z_,m_position(Utility::Math::_z_)+z);
		}

		void setPosition(Utility::Math::Vector<> &position){
			m_position = position;
		}

		void setPositionX(float x){
			m_position(Utility::Math::_x_,x);
		}

		void setPositionY(float y){
			m_position(Utility::Math::_y_,y);
		}

		void setPositionZ(float z){
			m_position(Utility::Math::_z_,z);
		}

		void setPosition(float x, float y, float z){
			m_position(Utility::Math::_x_,x);
			m_position(Utility::Math::_y_,y);
			m_position(Utility::Math::_z_,z);
		}

		void setOrientation(float x, float y, float z, float w){
			m_orientation.vec(Utility::Math::_x_,x);
			m_orientation.vec(Utility::Math::_y_,y);
			m_orientation.vec(Utility::Math::_z_,z);
			m_orientation.vec(Utility::Math::_w_,w);
		}

		void setScale(float scale){
			m_scale = scale;
		}

		Utility::Math::Vector<float> getPosition() 	{ return m_position; }
		Utility::Math::Quaternion<float> getOrientation() { return m_orientation; }
		float getScale() { return m_scale; }
	protected:
		Utility::Math::Quaternion<float> 	m_orientation;
		Utility::Math::Vector<float> 		m_position;
		float 								m_scale;
	};

	typedef boost::shared_ptr<SceneNode> SceneNodePtr;
}